package com.sqm.sync_tool.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 组织架构图
 * </p>
 *
 * @author sxubo
 * @since 2020-10-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("hr_organization")
public class HrOrganization extends Model<HrOrganization> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "organization_id", type = IdType.ID_WORKER_STR)
    private String organizationId;

    /**
     * 组织架构名称
     */
    @TableField("organization_name")
    private String organizationName;

    /**
     * 父级id
     */
    @TableField("organization_pid")
    private String organizationPid;

    /**
     * 负责人id
     */
    @TableField("main_user_id")
    private Integer mainUserId;

    /**
     * 数据创建时间
     */
    @TableField("create_time")
    private Long createTime;

    @TableField("update_time")
    private Long updateTime;

    /**
     * 是否删除 1 是 0否
     */
    @TableField("is_del")
    private Integer isDel;

    /**
     * 平台id
     */
    @TableField("infos_id")
    private String infosId;


    @Override
    protected Serializable pkVal() {
        return this.organizationId;
    }

}
